<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        
        .box {
            position: relative;
            width: 1200px;
            height: 85px;
            border: 1px solid #ccc;
        }
        
        .box #luzhou {
            width: 1200px;
            height: 85px;
        }
        
        .box #close-btn {
            /* 子绝父相，子盒子不再占有原来的位置 */
            position: absolute;
            top: -1px;
            right: 3px;
        }
    </style>
</head>

<body>
    <div class="box">
        <img src="images/luzhou.jpg" alt="" id="luzhou">
        <img src="images/close.jpg" alt="" id="close-btn">
    </div>
    <script>
        //1.获取事件
        var img = document.getElementById('close-btn');
        var box = document.querySelector('.box');
        //2.注册事件
        img.onclick = function() {
            //display属性：元素的显示与隐藏 隐藏对象：display:none  显示对象：display:block
            box.style.display = 'none';
        }
    </script>
</body>

</html>